{include file="common/header.tpl"}
{if $AppUI->id <= 0}
	{include file="index/login.tpl"}  
{else}
	{include file="common/menu.tpl"}    
    <div class="rightColumn">
    	<div class="boxContent">
        	<div class="contentItem">
                <div class="contentItems">
                	<div class="headerTitle"><h2><a href="{$smarty.const.HOST_BACKEND}product/news">Quà lưu niệm mới</a>{if isset($smarty.session.product) && ($smarty.session.product&1<<1) > 0} &raquo; <a href="{$smarty.const.HOST_BACKEND}product/add?cate={$intCategory}&amp;sub={$intSubCategory}">Thêm mới</a>{/if}</h2></div>
                    <form name="frmSearch" id="frmSearch" action="{$smarty.const.HOST_BACKEND}product/news" onsubmit="javascript:return actionSearch();" method="get" enctype="multipart/form-data">
	                	{include file="product/search.tpl"}
                    </form>
                	<form name="frmProduct" id="frmProduct" action="{$smarty.const.HOST_BACKEND}product/act" method="post" enctype="multipart/form-data">
                    	<input type="hidden" name="paction" id="paction"/>
                        <div class="secData">
                        	{if $arrResult}
                                <div class="secActionAndPage">
                                    <div class="actionLink">
                                    	{if isset($smarty.session.product)}
                                            {if ($smarty.session.product&1<<5) > 0}
                                            	<input type="button" onclick="javascript:act(this.form,5);" value="Tháo bỏ sản phẩm mới" class="btnLarge"/>
                                            {/if}
                                            {if ($smarty.session.product&1<<3) > 0}  
                                            	<input type="button" onclick="javascript:confirmDelete(this.form);" value="Xóa"/>
                                            	{if $AppUI->type == 2}
                                                	<input type="button" onclick="javascript:confirmDeleteDb(this.form);" value="Xóa khỏi Db"/>
                                                {/if}
                                            {/if}
                                       	{else}
                                        	&nbsp;
                                        {/if}
                                    </div>
                                    <div class="totalPage"><strong>Tổng số: {$intTotal}</strong></div>
                                </div>
                            {/if}
                            {include file="product/box-list.tpl"}
                            {if $arrResult}
                                <div class="secActionAndPage">
                                    <div class="actionLink">
                                    	{if isset($smarty.session.product)}
                                            {if ($smarty.session.product&1<<5) > 0}
                                            	<input type="button" onclick="javascript:act(this.form,5);" value="Tháo bỏ sản phẩm mới" class="btnLarge"/>
                                            {/if}
                                            {if ($smarty.session.product&1<<3) > 0}  
                                            	<input type="button" onclick="javascript:confirmDelete(this.form);" value="Xóa"/>
                                            	{if $AppUI->type == 2}
                                                	<input type="button" onclick="javascript:confirmDeleteDb(this.form);" value="Xóa khỏi Db"/>
                                                {/if}
                                            {/if}
                                       	{else}
                                        	&nbsp;
                                        {/if}
                                    </div>
                                    {paging total=$intTotal limit=$intLimit offset=$intOffset url=$strUrl}
                                </div>
                            {/if}
                      	</div>
                   	</form>
                </div>
          	</div>
        </div>
    </div>
{/if}
{include file="common/footer.tpl"}
                
